package com.wu.cloud.userservice.service;

import bean.PeskResponseEntity;
import bean.UserLoginEntity;
import bean.UserRegisterEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wu.cloud.userservice.entity.db.UserTableEntity;
import com.wu.cloud.userservice.entity.vo.UserVo;

import java.util.List;
import java.util.Map;

/**
 * @author xwu36
 */
public interface UserAccountService extends IService<UserTableEntity> {

    /**
     * 用户登录
     *
     * @param userLoginEntity 参数
     * @return json
     */
    PeskResponseEntity login(UserLoginEntity userLoginEntity);

    /**
     * 查询一个用户
     * @param username 用户名
     * @return user
     */
    List<Map<String,Object>> findUserByUserName(String username);

    /**
     * 用户注册
     *
     * @param userRegisterEntity 参数
     * @return json
     */
    PeskResponseEntity register(UserRegisterEntity userRegisterEntity);

    /**
     * 用户忘记密码,重置
     *
     * @param uid      用户唯一ID
     * @param password 用户新密码
     * @return json
     */
    PeskResponseEntity forget(String uid, String password);

    /**
     * 查询用户老密码
     *
     * @param uid 用户唯一ID
     * @return json
     */
    PeskResponseEntity queryOldPassword(String uid);

    PeskResponseEntity queryUserList(UserVo userVo);

}
